﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link href="/style/rightdirectory.css" rel="stylesheet" />
    <link href="/script/plugins/checked-enrich/checked-enrich.css" rel="stylesheet" />
    <script src="/script/config.js"></script>
    <script src="/script/plugins/checked-enrich/jquery.checked-enrich.js?time=000"></script>
    <script src="../../../../script/pack/zui/lib/sortable/zui.sortable.js"></script>
    <style>
        #enrichGropDown { z-index: 22; }
    </style>
</head>
 
<body>
    <div class="form-body">
        <div style="float:right;">
            <button class="btn " type="button" data-refresh='thispage'><i class="icon icon-repeat"></i>刷新</button>
            <button type="button" id="btn-search" class="btn btn-primary">保存</button>
            <button type="button" class="btn" onclick="window.history.go(-1)">返回</button>
        </div>
        <ul class="nav nav-tabs">
            <li class="active"><a data-tab href="#tabContent1">基本信息</a></li>
            <li><a data-tab href="#tabContent5">首页图</a></li>
            <li><a data-tab href="#tabContent3">轮播图</a></li>
            <li><a data-tab href="#tabContent4">规格</a></li>
            <li><a data-tab href="#tabContent2">详细介绍</a></li>
        </ul>
        <div class="tab-content" id="form">
            <!--产品基本信息-->
            <div class="tab-pane active" id="tabContent1">
            </div>
            <!--详细介绍-->
            <div class="tab-pane" id="tabContent2">
                <div class="form-group col-xs-12">
                    <textarea id="Detail" style="width:1024px;height:500px;">
                    </textarea>
                </div>
            </div>
            <!--产品轮播图-->
            <div class="tab-pane" id="tabContent3">
                <div style="float:right;">
                    <button class="btn btn-success " type="button" onclick="addBannerImg(0)">添加</button>
                </div>
                <div class="cardss" id="imgcarousel-body">
                </div>
            </div>
            <!--产品SKU信息-->
            <div class="tab-pane sku" id="tabContent4">
                <div class="panel" id="Content4">
                </div>
                <div class="panel-group" id="accordionPanels" aria-multiselectable="true">
                </div>
                <table class="table skutable" style="margin-bottom:200px;">
                    <thead>
                        <tr></tr>
                    </thead>
                    <tbody></tbody>
                </table>
            </div>
            <!-- 产品首页图 -->
            <div class="tab-pane" id="tabContent5">
                <div style="float:right;">
                    <button class="btn btn-success " type="button" onclick="addBannerImg(1)">添加</button>
                </div>
                <div class="cardss" id="imgurl-body">
                </div>
            </div>
        </div>
    </div>
    <div class="form-bottom"></div>
</body>
</html>
<!--配置页面SKU复选框模板-->
<script type="text/html" id="ConfigCheckBox">
    <div class="checkbox " onclick="LoadSKUKey(this)">
        <label class="checkbox-reset">
            <input type="checkbox" class="sku_key{{item.Id}}" data-value="{{item.Id}}"><span>{{item.AttrName}}</span>
        </label>
    </div>
</script>
<!--table表格模板-->
<script type="text/html" id="Table">
    <tr data-id='{{item.id}}'>
        {{#item.skus}}
        <td class="col-sm-1"><a href='#'><img data-tag='SkuPropertyPic' src="{{item.SkuPropertyPic}}" style='width:30px;height:30px;' /></a></td>
        <td class="col-sm-1"><input type='text' class='form-control col-sm-3' data-tag='OriginalPrice' value='{{item.OriginalPrice}}' /></td>
        <td class="col-sm-1"><input type='text' class='form-control col-sm-3' data-tag='SellPrice' value='{{item.SellPrice}}' /></td>
        <td class="col-sm-1"><input type='text' class='form-control col-sm-3' data-tag='Inventory' value='{{item.Inventory }}' /></td>
        <td class="col-sm-1"><input type='text' class='form-control col-sm-3' data-tag='GroupPrice' value='{{item.GroupPrice }}' /></td>
        <td class="col-sm-1"><input type='text' class='form-control col-sm-3' data-tag='PartnerLevelOneCommission' value='{{item.PartnerLevelOneCommission }}' /></td>
        <td class="col-sm-1"><input type='text' class='form-control col-sm-3' data-tag='PartnerLevelTwoCommission' value='{{item.PartnerLevelTwoCommission }}' /></td>
        <td class="col-sm-1"><input type='text' class='form-control col-sm-3' data-tag='PartnerLevelOtherCommission' value='{{item.PartnerLevelOtherCommission }}' /></td>
        <td class="col-sm-1"><input type='text' class='form-control col-sm-3' data-tag='CommonLevelOneCommission' value='{{item.CommonLevelOneCommission }}' /></td>
        <td class="col-sm-1"><input type='text' class='form-control col-sm-3' data-tag='CommonLevelTwoCommission' value='{{item.CommonLevelTwoCommission }}' /></td>
        <td class="col-sm-1">
            <select class="form-control" data-tag='CommissionType' value='{{item.CommissionType }}'>
                <option value="1">数值</option>
                <option value="2">比例</option>
            </select>
        </td>
    </tr>
</script>
<!--SKU_Value选项模板-->
<script type="text/html" id="SkuValue">
    <div class="panel panel-default sku_key_item sku_key_item{{item.Id}}">
        <div class="panel-heading" id="heading{{item.Id}}">
            <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordionPanels" href="#collapse{{item.Id}}">{{item.AttrName}}</a></h4>
        </div>
        <div id="collapse{{item.Id}}" class="panel-collapse collapse">
            <div class="panel-body key' + item.Id + '">[[sku_value{{item.Id}}]]</div>
        </div>
    </div>
</script>
<!--SKU_Value_Checkbox选项模板-->
<script type="text/html" id="SkuValueCheckBox">
    <div class="checkbox" onclick="EditSKUOfData(this)">
        <label class="checkbox-reset">
            <input type="checkbox" class="skuvalue{{item.ProductAttrKey_Id}}" data-kid="{{item.ProductAttrKey_Id}}" data-id="{{item.Id }}"><span>{{item.AttrValue}}</span>
        </label>
    </div>
</script>

<!-- 产品基本信息 -->
<script type="text/html" id="tem-Content1">
    <div class="form-group col-xs-7">
        <label for="ProductName" class="col-sm-2">产品名称</label>
        <div class="col-md-6 col-sm-10">
            <textarea class="form-control" data-form="ProductName">{{P.ProductName}}</textarea>
        </div>
    </div>
    <div class="form-group col-xs-7">
        <label for="ProductType_Id" class="col-sm-2">产品类型</label>
        <div class="col-sm-3">
            <select class="form-control enrich-drop-down" id="ProductType_Id" data-form="ProductType_Id" value="{{P.ProductType_Id}}">
                <!--<option value="">请选择类型</option>
                {{each type c}}
                <option value="{{c.Id}}">{{c.TypeName}}</option>
                {{/each}}-->
            </select>
        </div>
    </div>
    <div class="form-group col-xs-7">
        <label for="ProductBrand_Id" class="col-sm-2">产品品牌</label>
        <div class="col-sm-3">
            <select class="form-control" id="ProductBrand_Id" data-form="ProductBrand_Id" value="{{P.ProductBrand_Id}}">
                <option value="">请选择品牌</option>
                {{each brand t}}
                <option value="{{t.Id}}">{{t.BrandName}}</option>
                {{/each}}
            </select>
        </div>
    </div>
    <div class="form-group col-xs-7">
        <label for="ProductName" class="col-sm-2">价格区间</label>
        <div class="col-sm-3">
            <div class="input-group" style="width:250px">
                <input type="text" class="form-control" style="width:100%" id="ProductName" placeholder="最小价格" data-form="MinPrice" value="{{P.MinPrice}}" />
                <span class="input-group-addon fix-border">至</span>
                <input type="text" class="form-control" style="width:100%" id="ProductName" placeholder="最大价格" data-form="MaxPrice" value="{{P.MaxPrice}}" />
            </div>

        </div>
    </div>
    <div class="form-group col-xs-7">
        <label for="Sort" class="col-sm-2">产品排序</label>        
        <div class="col-sm-6">
            <textarea style="resize: none;height:33px;" class="form-control" maxlength="200" id="Sort" rows="1" placeholder="越大越前" data-form="Sort" value="{{P.Sort}}">{{P.Sort}}</textarea>
        </div>
    </div>
    <div class="form-group col-xs-7">
        <label for="PutawayState" class="col-sm-2">上架状态</label>
        <div class="col-sm-3">
            <select class="form-control" id="PutawayState" data-form="PutawayState" value="{{P.PutawayState}}">
                <option value="0">未上架</option>
                <option value="1">上架</option>
                <option value="2">下架</option>
            </select>
        </div>
    </div>
    <div class="form-group col-xs-7">
        <label for="NewState" class="col-sm-2">新产品状态</label>
        <div class="col-sm-3">
            <select class="form-control" id="NewState" data-form="NewState" value="{{P.NewState}}">
                <option value="0">是</option>
                <option value="1">不是</option>
            </select>
        </div>
    </div>
    <div class="form-group col-xs-7">
        <label for="Explain" class="col-sm-2">产品简洁说明</label>
        <div class="col-sm-6">
            <textarea class="form-control" maxlength="200" id="Explain" rows="3" placeholder="最大可以输入200字" data-form="Explain" value="{{P.Explain}}">{{P.Explain}}</textarea>
        </div>
    </div>
    <div class="form-group col-xs-7">
        <label for="Features" class="col-sm-2">产品亮点</label>
        <div class="col-sm-6">
            <textarea class="form-control" id="Features" maxlength="100" rows="3" placeholder="最大可以输入100字" data-form="Features" value="{{P.Features}}">{{P.Features}}</textarea>
        </div>
    </div>
</script>
<!--产品轮播图&首页图-->
<script type="text/html" id="tp-imgcarousel">
    {{each imgUrl item}}
    <div class="carditem col-xs-2">
        <div class="card" href="javascript:;">
            <img style="width:100%;" data-url src="{{item}}">
            <div class="card-actions">
                <button type="button" class="btn btn-mini  btn-primary" onclick="addBannerImg(this)">上传图片</button>
                <button class="btn btn-mini btn-danger" style="padding: 1px 24px; float: right;" type="button" onclick="DeleteBanner(this)">删除</button>
            </div>
        </div>
    </div>
    {{/each}}
</script>

<!--产品轮播图&首页图-->
<script type="text/html" id="tp-imgcarousel-item">
    <div class="carditem col-xs-2">
        <div class="card" href="javascript:;">
            <img style="width:100%;" data-url src="{{imgUrl}}">
            <div class="card-actions">
                <button type="button" class="btn btn-mini  btn-primary" onclick="addBannerImg(this)">上传图片</button>
                <button class="btn btn-mini btn-danger" style="padding: 1px 24px; float: right;" type="button" onclick="DeleteBanner(this)">删除</button>
            </div>
        </div>
    </div>
</script>

<!-- SKU初始化属性配置——模板 -->
<script type="text/html" id="tem-sku">
    <div class="panel-heading">
        SKU属性配置<button class="btn " style="float:right; padding:0px 15px;" type="button" onclick="ShowSKUList()"><i class="icon icon-cog" style="margin-right:5px;"></i>配置</button>
    </div>
    <div class="panel-body sku-config ">
        <div class="col-sm-2">
            产品图片：<img id="LoadSkuPropertyPic" src="#" style="width:50px; height:50px;" class="img-thumbnail" alt="" />
        </div>
        <div class="input-control col-sm-2">
            原价：<input id="LoadOriginalPrice" data-form="OriginalPrice" type="text" class="form-control" placeholder="" value="0" maxlength="20">
        </div>
        <div class="input-control col-sm-2">
            目前价格：<input id="LoadSellPrice" type="text" data-form="SellPrice" class="form-control" placeholder="" value="0" maxlength="20">
        </div>
        <div class="input-control col-sm-2">
            商品库存：<input id="LoadInventory" type="text" data-form="Inventory" class="form-control" placeholder="" value="0" maxlength="20">
        </div>
        <div class="input-control col-sm-2">
            团购价格：<input id="LoadGroupPrice" type="text" data-form="GroupPrice" class="form-control" placeholder="" value="0" maxlength="20">
        </div>
        <div class="input-control col-sm-2">
            第一级是合伙人分利：<input id="LoadPartnerLevelOneCommission" type="text" data-form="PartnerLevelOneCommission" class="form-control" placeholder="" value="0" maxlength="20">
        </div>
        <div class="input-control col-sm-2">
            第二级是合伙人分利：<input id="LoadPartnerLevelTwoCommission" type="text" data-form="PartnerLevelTwoCommission" class="form-control" placeholder="" value="0" maxlength="20">
        </div>
        <div class="input-control col-sm-2">
            第三级及无限级分利：<input id="LoadPartnerLevelOtherCommission" type="text" data-form="PartnerLevelOtherCommission" class="form-control" placeholder="" value="0" maxlength="20">
        </div>
        <div class="input-control col-sm-2">
            普通第一级分利：<input id="LoadCommonLevelOneCommission" type="text" data-form="CommonLevelOneCommission" class="form-control" placeholder="" value="0" maxlength="20">
        </div>
        <div class="input-control col-sm-2">
            普通第二季分利：<input id="LoadCommonLevelTwoCommission" type="text" data-form="CommonLevelTwoCommission" class="form-control" placeholder="" value="0" maxlength="20">
        </div>
        <div class="input-control col-sm-2">
            分利类型：<select class="form-control" id="LoadCommissionType">
                <option value="1">数值</option>
                <option value="2">比例</option>
            </select>
        </div>
    </div>
</script>
<script>
    $(function () {
        $("#tabContent3>.cardss").sortable(); //拖放
    })
</script>
<script src="/script/plugins/upload/js/config.js"></script>
<script src="/script/plugins/ue/ue-all.config.js"></script>
<script src="/script/plugins/ue/ueditor.all.js"></script>
<link href="/script/valid/css/tr.css" rel="stylesheet" />
<script src="/script/valid/form-valid.js?v=2018"></script>
<script src="/controller/mall/product/productment/form.js?1231"></script>
